package com.dt.system.service.impl;

import java.util.List;
import com.dt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dt.system.mapper.ModRepositoriesMapper;
import com.dt.system.domain.ModRepositories;
import com.dt.system.service.IModRepositoriesService;

@Service
public class ModRepositoriesServiceImpl implements IModRepositoriesService 
{
    @Autowired
    private ModRepositoriesMapper modRepositoriesMapper;

    /**
     * 查询详情
     */
    @Override
    public ModRepositories selectModRepositoriesById(Long id)
    {
        return modRepositoriesMapper.selectModRepositoriesById(id);
    }

    /**
     * 查询
     */
    @Override
    public List<ModRepositories> selectModRepositoriesList(ModRepositories modRepositories)
    {
        return modRepositoriesMapper.selectModRepositoriesList(modRepositories);
    }

    /**
     * 新增
     */
    @Override
    public int insertModRepositories(ModRepositories modRepositories)
    {
        modRepositories.setCreateTime(DateUtils.getNowDate());
        return modRepositoriesMapper.insertModRepositories(modRepositories);
    }

    /**
     * 修改
     */
    @Override
    public int updateModRepositories(ModRepositories modRepositories)
    {
        modRepositories.setUpdateTime(DateUtils.getNowDate());
        return modRepositoriesMapper.updateModRepositories(modRepositories);
    }

    /**
     * 批量删除
     */
    @Override
    public int deleteModRepositoriesByIds(Long[] ids)
    {
        return modRepositoriesMapper.deleteModRepositoriesByIds(ids);
    }

    /**
     * 删除
     */
    @Override
    public int deleteModRepositoriesById(Long id)
    {
        return modRepositoriesMapper.deleteModRepositoriesById(id);
    }

    /**
     * 批量插入
     */
    @Override
    public int batchInsertModRepositories(List<ModRepositories> dataList)
    {
        return modRepositoriesMapper.batchInsertModRepositories(dataList);
    }


}
